import {
  CreateDateColumn,
  Entity,
  PrimaryGeneratedColumn, UpdateDateColumn,
} from 'typeorm';


@Entity()
export class BaseEntity {

  @PrimaryGeneratedColumn('uuid')
  id: string;

  /**
   * 创建时间
   */
  @CreateDateColumn({ type: 'datetime', name: 'gmt_create'})
  gmtCreate: Date;

  /**
   * 修改时间
   */
  @UpdateDateColumn({ type: 'datetime', name: 'gmt_modified'})
  gmtModified: Date;

}
